import request from '@/utils/request'
export default {
    getAllExhibition(pageNum, pageSize) {
        const params = {
            pageNum,
            pageSize
        }
        return request.get("/exhibition", { params }, {
            method: "get",
        })
    },
    
    // 添加新的展览API方法
    addExhibition(data) {
        return request.post("/exhibition", data, {
            method: "post",
            headers: {
                'Content-Type': 'application/json'
            }
        })
    },
    //根据id获取展览信息
    getExhibitionById(id) {
        return request.get(`/exhibition/${id}`, {
            method: "get",
        })
    },

    //放票
    releaseTicket(data) {
        return request.post("/exhibition/setExhibitionTicket", data, {
            method: "post",
            headers: {
                'Content-Type': 'application/json'
            }
        })
    },
    //根据id获取票信息
    getTicketById(id) {
        return request.get(`/exhibition/getExhibitionTicket/${id}`, {
            method: "get",
        })
    },
    //根据展览id获取订单信息
    getExhibitionOrderById(id){
        return request.get(`/exhibition/getExhibitionOrder/${id}`,{
            method:'get'
        })
    }
}